package com.css.gdzj.gdzjbxgd.modules.reportcontral.repository;

import com.css.gdzj.gdzjbxgd.modules.reportcontral.entity.BxgdReportContralEntity;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.transaction.annotation.Transactional;

import java.util.HashMap;

/**
 * @author z
 * @date 2020-12-11
 */
public interface BxgdReportContralRepository extends JpaRepository<BxgdReportContralEntity, String> {
    @Transactional
/*    @Modifying*/
    @Query(value = "select * from bxgd_report_contral order by report_year DESC ,update_time desc limit 1",nativeQuery = true)
    BxgdReportContralEntity selectLimitTime();

    @Query(value = "select report_year from bxgd_report_contral where create_user = 'A_123456789' order by report_year DESC ,update_time desc limit 1",nativeQuery = true)
    String queryReportYear();

}


